package com.xhorse.lockplatform.comm.persist;

import com.xhorse.lockplatform.comm.model.BaseId;
import com.xhorse.lockplatform.comm.util.Paginator;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * ibatis操作表的Mapper基础接口
 *
 * @author Tom
 */
public interface BaseMapper<T extends BaseId> {

    int deleteById(Integer id);

    int deleteByIds(int[] ids);

    int insert(T t);

    int insertSelective(T t);

    List<T> selectAll();

    List<T> select(Paginator page);

    int count(Paginator page);

    T selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(T t);

    int updateByPrimaryKey(T t);

    int insertByBatch(List<T> t);
}